package com.bt.lms.ui.page.enp;

import com.bt.lms.ui.action.enp.CancelEnrollmentPlanBtnAction;
import com.bt.lms.ui.action.enp.SaveAddEnpPlanAction;
import com.bt.lms.main.BotLmsApp;
import com.bt.lms.ui.page.sys.style.BtnStyle;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.geometry.Insets;
import javafx.geometry.Pos;
import javafx.scene.Cursor;
import javafx.scene.Scene;
import javafx.scene.control.*;
import javafx.scene.layout.HBox;
import javafx.scene.layout.VBox;
import javafx.scene.paint.Color;
import javafx.scene.text.Font;
import javafx.scene.text.FontPosture;
import javafx.scene.text.FontWeight;
import javafx.stage.Stage;


/**
 * 新增招生计划界面
 */
public class AddEnrollment extends VBox {


    private Integer width = BotLmsApp.PER_WIGHT;

    private Integer height = BotLmsApp.HEIGHT;


    public AddEnrollment() {

        this.setPrefWidth(width);
        this.setPrefHeight(height);

        //当前位置
        HBox locationHBox = new HBox();
        locationHBox.setPadding(new Insets(15, 15, 15, 15));
        locationHBox.setPrefWidth(width);
        double locationHBoxHeight = height * 0.05;
        locationHBox.setPrefHeight(locationHBoxHeight);
        Label label1 = new Label("当前位置：🏠>招生管理>招生计划管理>新增招生计划");
        Font font = Font.font("仿宋", FontWeight.THIN, FontPosture.REGULAR, 18);
        label1.setFont(font);
        locationHBox.getChildren().add(label1);
        this.getChildren().add(locationHBox);

        //新增招生计划标题
        HBox topHBox = new HBox();
        topHBox.setPadding(new Insets(15, 15, 15, 15));
        double topHBoxHeight = height * 0.05;
        topHBox.setPrefHeight(topHBoxHeight);
        topHBox.setPrefWidth(width);
        Label addLb = new Label("新增招生计划");

        Font font1 = Font.font("仿宋", FontWeight.BOLD, FontPosture.REGULAR, 20);
        Color color = Color.rgb(150, 1, 1, 1);
        addLb.setFont(font1);
        addLb.setTextFill(color);

        topHBox.getChildren().add(addLb);
        this.getChildren().add(topHBox);


        //招生计划编号盒子
        HBox codeHBox = new HBox();
        codeHBox.setSpacing(20);
        codeHBox.setPadding(new Insets(15, 15, 15, 15));
        double codeHBoxHeight = height * 0.05;
        codeHBox.setPrefHeight(codeHBoxHeight);
        codeHBox.setPrefWidth(width);
        Label codeLb = new Label("招生计划编号*");
        codeLb.setPrefWidth(100);
        TextField codeTF = new TextField("666");
        codeTF.setPromptText("请输入招生计划编号");
        codeTF.setId("codeTF");
        codeHBox.getChildren().addAll(codeLb, codeTF);


        //计划名称盒子
        HBox nameHBox = new HBox();
        nameHBox.setSpacing(20);
        nameHBox.setPadding(new Insets(15, 15, 15, 15));
        double nameHBoxHeight = height * 0.05;
        nameHBox.setPrefHeight(nameHBoxHeight);
        nameHBox.setPrefWidth(width);
        Label nameLb = new Label("计划名称*");
        nameLb.setPrefWidth(100);
        TextField nameTf = new TextField("博添实训");
        nameTf.setPromptText("请输入计划名称");
        nameTf.setId("nameTf");
        nameHBox.getChildren().addAll(nameLb, nameTf);


        //计划内容盒子
        HBox contentHBox = new HBox();
        contentHBox.setSpacing(20);
        contentHBox.setPadding(new Insets(15, 15, 15, 15));
        double contentHBoxHeight = height * 0.1;
        contentHBox.setPrefHeight(contentHBoxHeight);
        contentHBox.setPrefWidth(width);
        Label contentLb = new Label("计划内容*");
        contentLb.setPrefWidth(100);
        TextArea contentTA = new TextArea("俺喜欢爱家乡看看吗");
        contentTA.setMinHeight(100);
        contentTA.setPromptText("请输入内容");
        contentTA.setId("contentTA");
        contentHBox.getChildren().addAll(contentLb, contentTA);


        //招生层次盒子
        HBox levelHBox = new HBox();
        levelHBox.setSpacing(20);
        levelHBox.setPadding(new Insets(15, 15, 15, 15));
        double levelHBoxHeight = height * 0.05;
        levelHBox.setPrefHeight(levelHBoxHeight);
        levelHBox.setPrefWidth(width);
        Label levelLb = new Label("招生层次*");
        levelLb.setPrefWidth(100);
        ComboBox<String> levelCom = new ComboBox<>();
        levelCom.setId("levelCom");
        levelCom.getSelectionModel().select("不限");
        levelCom.getItems().add("高中");
        levelCom.getItems().add("大专");
        levelCom.getItems().add("其他");
        levelHBox.getChildren().addAll(levelLb, levelCom);

        //招生专业盒子
        HBox specialtyHBox = new HBox();
        specialtyHBox.setSpacing(20);
        specialtyHBox.setPadding(new Insets(15, 15, 15, 15));
        double specialtyHBoxHeight = height * 0.05;
        specialtyHBox.setPrefHeight(specialtyHBoxHeight);
        specialtyHBox.setPrefWidth(width);
        Label specialtyLb = new Label("招生专业*");
        specialtyLb.setPrefWidth(100);
        ComboBox<String> specialtyCom = new ComboBox<>();
        specialtyCom.setId("specialtyCom");
        specialtyCom.getSelectionModel().select("不限");
        specialtyCom.getItems().add("不限");
        specialtyHBox.getChildren().addAll(specialtyLb, specialtyCom);


        //招生人数盒子
        HBox enPopulationHBox = new HBox();
        enPopulationHBox.setSpacing(20);
        enPopulationHBox.setPadding(new Insets(15, 15, 15, 15));
        double enPopulationHBoxHeight = height * 0.05;
        enPopulationHBox.setPrefHeight(enPopulationHBoxHeight);
        enPopulationHBox.setPrefWidth(width);
        Label enPopulationLb = new Label("招生人数*");
        enPopulationLb.setPrefWidth(100);
        TextField enPopulationTF = new TextField("55");
        enPopulationTF.setPromptText("请输入招生人数");
        enPopulationTF.setId("enPopulationTF");
        enPopulationHBox.getChildren().addAll(enPopulationLb, enPopulationTF);

        //学习中心盒子
        HBox studyCentreHBox = new HBox();
        studyCentreHBox.setSpacing(20);
        studyCentreHBox.setPadding(new Insets(15, 15, 15, 15));
        double studyCentreHBoxHeight = height * 0.05;
        studyCentreHBox.setPrefHeight(studyCentreHBoxHeight);
        studyCentreHBox.setPrefWidth(width);
        Label studyCentreLb = new Label("学习中心*");
        studyCentreLb.setPrefWidth(100);

        Button studyCentreBtn = new Button("选择学习中心");
        studyCentreBtn.setOnAction(new EventHandler<ActionEvent>() { //弹窗
            @Override
            public void handle(ActionEvent event) {
                Stage stage = new Stage();
                stage.show();
                stage.setTitle("选择学习中心");

                VBox vBox = new VBox();
                vBox.setSpacing(20);
                vBox.setPadding(new Insets(10));
                Scene scene = new Scene(vBox, 900, 500);
                stage.setScene(scene);

                Label studyCenterLab = new Label("学习中心");
                Font font1 = Font.font("仿宋", FontWeight.BOLD, FontPosture.REGULAR, 20);
                Color color = Color.rgb(150, 1, 1, 1);
                studyCenterLab.setFont(font1);
                studyCenterLab.setTextFill(color);

                vBox.getChildren().addAll(studyCenterLab);
            }
        });
        studyCentreBtn.setStyle("-fx-background-color: #00a6ff");
        studyCentreHBox.getChildren().addAll(studyCentreLb, studyCentreBtn);


        //关联教学计划盒子
        HBox associationItemsHBox = new HBox();
        associationItemsHBox.setSpacing(20);
        associationItemsHBox.setPadding(new Insets(15, 15, 15, 15));
        double associationItemsHBoxHeight = height * 0.05;
        associationItemsHBox.setPrefHeight(associationItemsHBoxHeight);
        associationItemsHBox.setPrefWidth(width);
        Label associationItemsLb = new Label("关联教学计划*");
        associationItemsLb.setPrefWidth(100);


        Button teachingPlanBtn = new Button("选择教学计划");
        teachingPlanBtn.setStyle("-fx-background-color: #00a6ff");
        teachingPlanBtn.setOnAction(new EventHandler<ActionEvent>() { //弹窗
            @Override
            public void handle(ActionEvent event) {
                Stage stage = new Stage();
                stage.show();
                stage.setTitle("选择教学计划");

                VBox vBox = new VBox();
                vBox.setSpacing(20);
                vBox.setPadding(new Insets(10));
                Scene scene = new Scene(vBox, 900, 500);
                stage.setScene(scene);

                Label teachPlanLab = new Label("教学计划");
                Font font1 = Font.font("仿宋", FontWeight.BOLD, FontPosture.REGULAR, 20);
                Color color = Color.rgb(150, 1, 1, 1);
                teachPlanLab.setFont(font1);
                teachPlanLab.setTextFill(color);
                //第一行盒子
                HBox hBox = new HBox();
                hBox.setSpacing(7);
                Font font2 = Font.font("仿宋", FontWeight.BOLD, FontPosture.REGULAR, 14);
                Label codeLab = new Label("计划编号");
                codeLab.setPrefWidth(70);
                codeLab.setFont(font2);
                Label planNameLab = new Label("教学计划名称");
                planNameLab.setPrefWidth(90);
                planNameLab.setFont(font2);
                Label studyCenterLab = new Label("所属的学习中心");
                studyCenterLab.setPrefWidth(120);
                studyCenterLab.setFont(font2);
                Label majorLab = new Label("所属专业");
                majorLab.setPrefWidth(70);
                majorLab.setFont(font2);
                Label levelLab = new Label("适用层次");
                levelLab.setPrefWidth(70);
                levelLab.setFont(font2);
                Label studyLab = new Label("学制");
                studyLab.setPrefWidth(70);
                studyLab.setFont(font2);
                Label statusLab = new Label("状态");
                statusLab.setPrefWidth(70);
                statusLab.setFont(font2);
                Label courseNumLab = new Label("关联课程数");
                courseNumLab.setPrefWidth(80);
                courseNumLab.setFont(font2);
                Label termLab = new Label("当前学期");
                termLab.setPrefWidth(70);
                termLab.setFont(font2);
                hBox.getChildren().addAll(codeLab, planNameLab, studyCenterLab, majorLab, levelLab, studyLab, statusLab, courseNumLab, termLab);

                //第一行数据
                HBox hBox1 = new HBox();
                hBox1.setSpacing(40);
                Label codeLab1 = new Label("1");
                codeLab.setPrefWidth(70);
                codeLab.setFont(font2);
                Label planNameLab1 = new Label("2023年java工程师");
                planNameLab.setPrefWidth(90);
                planNameLab.setFont(font2);
                Label studyCenterLab1 = new Label("清华大学");
                studyCenterLab.setPrefWidth(120);
                studyCenterLab.setFont(font2);
                Label majorLab1 = new Label("java");
                majorLab.setPrefWidth(70);
                majorLab.setFont(font2);
                Label levelLab1 = new Label("免费师范生");
                levelLab.setPrefWidth(70);
                levelLab.setFont(font2);
                Label studyLab1 = new Label("4年");
                studyLab.setPrefWidth(70);
                studyLab.setFont(font2);
                Label statusLab1 = new Label("编辑中");
                statusLab.setPrefWidth(70);
                statusLab.setFont(font2);
                Label courseNumLab1 = new Label("4");
                courseNumLab.setPrefWidth(80);
                courseNumLab.setFont(font2);
                Label termLab1 = new Label("第一学期");
                termLab.setPrefWidth(70);
                termLab.setFont(font2);
                RadioButton radioButton = new RadioButton();
                hBox1.getChildren().addAll(codeLab1, planNameLab1, studyCenterLab1, majorLab1, levelLab1, studyLab1, statusLab1, courseNumLab1, termLab1, radioButton);

                //第二行数据
                HBox hBox2 = new HBox();
                hBox2.setSpacing(40);
                Label codeLab2 = new Label("2");
                codeLab.setPrefWidth(70);
                codeLab.setFont(font2);
                Label planNameLab2 = new Label("2023年java工程师");
                planNameLab.setPrefWidth(90);
                planNameLab.setFont(font2);
                Label studyCenterLab2 = new Label("清华大学");
                studyCenterLab.setPrefWidth(120);
                studyCenterLab.setFont(font2);
                Label majorLab2 = new Label("java");
                majorLab.setPrefWidth(70);
                majorLab.setFont(font2);
                Label levelLab2 = new Label("免费师范生");
                levelLab.setPrefWidth(70);
                levelLab.setFont(font2);
                Label studyLab2 = new Label("4年");
                studyLab.setPrefWidth(70);
                studyLab.setFont(font2);
                Label statusLab2 = new Label("启用中");
                statusLab.setPrefWidth(70);
                statusLab.setFont(font2);
                Label courseNumLab2 = new Label("4");
                courseNumLab.setPrefWidth(80);
                courseNumLab.setFont(font2);
                Label termLab2 = new Label("第一学期");
                termLab.setPrefWidth(70);
                termLab.setFont(font2);
                RadioButton radioButton1 = new RadioButton();
                hBox2.getChildren().addAll(codeLab2, planNameLab2, studyCenterLab2, majorLab2, levelLab2, studyLab2, statusLab2, courseNumLab2, termLab2, radioButton1);
                //设置单选
                ToggleGroup toggleGroup = new ToggleGroup();
                radioButton.setToggleGroup(toggleGroup);
                radioButton1.setToggleGroup(toggleGroup);
                vBox.getChildren().addAll(teachPlanLab, hBox, hBox1, hBox2);
            }
        });
        associationItemsHBox.getChildren().addAll(associationItemsLb, teachingPlanBtn);

        //学费标准盒子
        HBox tuitionHBox = new HBox();
        tuitionHBox.setSpacing(20);
        tuitionHBox.setPadding(new Insets(15, 15, 15, 15));
        double tuitionHBoxHeight = height * 0.05;
        tuitionHBox.setPrefHeight(tuitionHBoxHeight);
        tuitionHBox.setPrefWidth(width);
        Label tuitionLb = new Label("学费标准*");
        tuitionLb.setPrefWidth(100);
        TextField tuitionTf = new TextField("5000");
        tuitionTf.setPromptText("请输入学费");
        tuitionTf.setId("tuitionTf");
        ComboBox<String> tuitionCom = new ComboBox<>();
        tuitionCom.setId("tuitionCom");
        tuitionCom.getSelectionModel().select("元/学年");
        tuitionCom.getItems().add("元/学年");
        tuitionCom.getItems().add("元/学分");
        tuitionCom.getItems().add("元/学时");
        tuitionHBox.getChildren().addAll(tuitionLb, tuitionTf, tuitionCom);


        //报名起止时间盒子
        HBox timeHBox = new HBox();
        timeHBox.setSpacing(20);
        timeHBox.setPadding(new Insets(15, 15, 15, 15));
        double timeHBoxHeight = height * 0.05;
        timeHBox.setPrefHeight(timeHBoxHeight);
        timeHBox.setPrefWidth(width);
        Label timeLb = new Label("报名起止时间*");
        timeLb.setPrefWidth(100);
        DatePicker startTimeDp = new DatePicker();
        startTimeDp.setEditable(false);//不可编辑
        startTimeDp.setId("startTimeDp");
        Label label = new Label("至");
        DatePicker stopTimeDp = new DatePicker();
        stopTimeDp.setEditable(false);//不可编辑
        stopTimeDp.setId("stopTimeDp");
        timeHBox.getChildren().addAll(timeLb, startTimeDp, label, stopTimeDp);

        //报名方式
        HBox regModeHBox = new HBox();
        regModeHBox.setSpacing(20);
        regModeHBox.setPadding(new Insets(15, 15, 15, 15));
        double regModeHBoxHeight = height * 0.05;
        regModeHBox.setPrefHeight(regModeHBoxHeight);
        regModeHBox.setPrefWidth(width);
        Label regModeLab = new Label("报名方式");
        regModeLab.setPrefWidth(100);
        ComboBox<Object> regModeCom = new ComboBox<>();
        regModeCom.getSelectionModel().select("线上");
        regModeCom.setId("regModeCom");
        regModeCom.getItems().add("线下");
        regModeCom.getItems().add("都可以");
        regModeHBox.getChildren().addAll(regModeLab, regModeCom);


        //报名地点盒子
        HBox enrollmentLocationHBox = new HBox();
        enrollmentLocationHBox.setSpacing(20);
        enrollmentLocationHBox.setPadding(new Insets(15, 15, 15, 15));
        double enrollmentLocationHBoxHeight = height * 0.05;
        enrollmentLocationHBox.setPrefHeight(enrollmentLocationHBoxHeight);
        enrollmentLocationHBox.setPrefWidth(width);
        Label enrollmentLocationLb = new Label("报名地点*");
        enrollmentLocationLb.setPrefWidth(100);

        ComboBox<String> enpLocationCom = new ComboBox<>();
        enpLocationCom.setId("enpLocationCom");
        enpLocationCom.getSelectionModel().select("山东省");
        enpLocationCom.getItems().add("山东省");
        ComboBox<String> areaCom = new ComboBox<>();
        areaCom.setId("areaCom");
        areaCom.getSelectionModel().select("济南市");
        areaCom.getItems().add("济南市");
        TextField enrollmentLocationTF = new TextField("长清区");
        enrollmentLocationTF.setPromptText("请输入您的详细地址");
        enrollmentLocationTF.setId("enrollmentLocationTF");
        enrollmentLocationHBox.getChildren().addAll(enrollmentLocationLb, enpLocationCom, areaCom, enrollmentLocationTF);

        //联系人盒子
        HBox LtdContactHBox = new HBox();
        LtdContactHBox.setSpacing(20);
        LtdContactHBox.setPadding(new Insets(15, 15, 15, 15));
        double LtdContactHBoxHeight = height * 0.05;
        LtdContactHBox.setPrefHeight(LtdContactHBoxHeight);
        LtdContactHBox.setPrefWidth(width);
        Label ltdContactLb = new Label("联系人*");
        ltdContactLb.setPrefWidth(100);
        TextField ltdContactTF = new TextField("李总");
        ltdContactTF.setPromptText("请输入联系人");
        ltdContactTF.setId("ltdContactTF");
        LtdContactHBox.getChildren().addAll(ltdContactLb, ltdContactTF);

        //移动电话盒子
        HBox phoneHBox = new HBox();
        phoneHBox.setSpacing(20);
        phoneHBox.setPadding(new Insets(15, 15, 15, 15));
        double phoneHBoxHeight = height * 0.05;
        phoneHBox.setPrefHeight(phoneHBoxHeight);
        phoneHBox.setPrefWidth(width);
        Label phoneLb = new Label("电话*");
        phoneLb.setPrefWidth(100);
        TextField phoneTF = new TextField("12345678910");
        phoneTF.setPromptText("请输入你的电话号码");
        phoneTF.setId("phoneTF");
        phoneHBox.getChildren().addAll(phoneLb, phoneTF);

        //电子邮箱
        HBox emailHBox = new HBox();
        emailHBox.setSpacing(20);
        emailHBox.setPadding(new Insets(15, 15, 15, 15));
        double emailHBoxHeight = height * 0.05;
        emailHBox.setPrefHeight(emailHBoxHeight);
        emailHBox.setPrefWidth(width);
        Label emailLb = new Label("电子邮箱*");
        emailLb.setPrefWidth(100);
        TextField emailTF = new TextField("2920081635@qq.com");
        emailTF.setPromptText("请输入电子邮箱");
        emailTF.setId("emailTF");
        emailHBox.getChildren().addAll(emailLb, emailTF);

        //大盒子
        HBox totalHBox = new HBox();
        totalHBox.setSpacing(20);
        totalHBox.setPadding(new Insets(15, 15, 15, 15));
        double totalHBoxHeight = height * 0.1;
        totalHBox.setPrefHeight(totalHBoxHeight);
        totalHBox.setPrefWidth(width);
        //报名材料盒子
        HBox materialsHBox = new HBox();
        materialsHBox.setSpacing(20);
        double materialsHBoxHeight = height * 0.1;
        materialsHBox.setMinWidth(materialsHBoxHeight);
        materialsHBox.setMinWidth(width * 0.05);
        Label materialsLb = new Label("报名材料*");
        materialsLb.setPrefWidth(100);
        materialsHBox.getChildren().add(materialsLb);
        totalHBox.getChildren().add(materialsHBox);


        //招生材料类型盒子
        VBox dataHBox = new VBox();
        dataHBox.setId("dataHBox");
        dataHBox.setSpacing(20);
        double dataHBoxHeight = height * 0.05;
        dataHBox.setPrefHeight(dataHBoxHeight);
        dataHBox.setPrefWidth(width * 0.25);
        CheckBox idBox = new CheckBox("身份证");
        idBox.setId("idBox");
        CheckBox picBox = new CheckBox("照片");
        picBox.setId("picBox");
        CheckBox diplomaBox = new CheckBox("学历证明");
        diplomaBox.setId("diplomaBox");
        CheckBox degreeBox = new CheckBox("学位证明");
        degreeBox.setId("degreeBox");
        CheckBox bodyExaBox = new CheckBox("体检报告");
        bodyExaBox.setId("bodyExaBox");
        CheckBox restsBox = new CheckBox("其他");
        restsBox.setId("restsBox");
        dataHBox.getChildren().addAll(idBox, picBox, diplomaBox, degreeBox, bodyExaBox, restsBox);

        totalHBox.getChildren().add(dataHBox);


        //报名事项盒子
        HBox itemsHBox = new HBox();
        itemsHBox.setSpacing(20);
        itemsHBox.setPadding(new Insets(15, 15, 15, 15));
        double itemsHBoxHeight = height * 0.1;
        itemsHBox.setPrefHeight(itemsHBoxHeight);
        itemsHBox.setPrefWidth(width);
        Label itemsLb = new Label("报名事项");
        itemsLb.setPrefWidth(100);
        TextArea itemsTA = new TextArea("睡觉哦从市场看看");
        itemsTA.setMinHeight(100);
        itemsTA.setPromptText("请输入报名事项");
        itemsTA.setId("itemsTA");
        itemsHBox.getChildren().addAll(itemsLb, itemsTA);

        //毕/结业相关事项盒子
        HBox graduateHBox = new HBox();
        graduateHBox.setSpacing(20);
        graduateHBox.setPadding(new Insets(15, 15, 15, 15));
        double graduateHBoxHeight = height * 0.1;
        graduateHBox.setPrefHeight(graduateHBoxHeight);
        graduateHBox.setPrefWidth(width);
        Label graduateLb = new Label("毕/结业相关事项");
        graduateLb.setPrefWidth(100);
        TextArea graduateTA = new TextArea("城市破卡恐怕口出口");
        graduateTA.setMinHeight(100);
        graduateTA.setPromptText("请输入毕/结业相关事项");
        graduateTA.setId("graduateTA");
        graduateHBox.getChildren().addAll(graduateLb, graduateTA);

        //补充说明盒子
        HBox replenishHBox = new HBox();
        replenishHBox.setSpacing(20);
        replenishHBox.setPadding(new Insets(15, 15, 15, 15));
        double replenishHBoxHeight = height * 0.1;
        replenishHBox.setPrefHeight(replenishHBoxHeight);
        replenishHBox.setPrefWidth(width);
        Label replenishLb = new Label("补充说明");
        replenishLb.setPrefWidth(100);
        TextArea replenishTA = new TextArea("电视卡v哦v叩叩叩v阿达");
        replenishTA.setMinHeight(100);
        replenishTA.setPromptText("请输入补充说明");
        replenishTA.setId("replenishTA");
        replenishHBox.getChildren().addAll(replenishLb, replenishTA);


        //数据大盒子
        VBox totalVBox = new VBox();
        totalVBox.setPadding(new Insets(15, 15, 15, 15));
        double totalVBoxHeight = height * 0.9;
        totalVBox.setPrefHeight(totalVBoxHeight);
        totalVBox.setPrefWidth(width);
        ScrollPane scrollPane = new ScrollPane();//滚动条
        scrollPane.setHbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);
        scrollPane.setVbarPolicy(ScrollPane.ScrollBarPolicy.ALWAYS);//只能竖向滚动不能横向滚动
        scrollPane.setContent(totalVBox);

        totalVBox.getChildren().addAll(codeHBox, nameHBox, contentHBox, levelHBox, specialtyHBox, enPopulationHBox, studyCentreHBox, associationItemsHBox, tuitionHBox, timeHBox, regModeHBox, enrollmentLocationHBox, LtdContactHBox, phoneHBox, emailHBox, totalHBox, itemsHBox, graduateHBox, replenishHBox);
        this.getChildren().add(scrollPane);

        //保存取消按钮盒子
        HBox saveHBox = new HBox();
        saveHBox.setAlignment(Pos.CENTER);
        saveHBox.setSpacing(20);
        saveHBox.setPadding(new Insets(15, 15, 15, 15));
        double saveHBoxHeight = height * 0.1;
        saveHBox.setPrefHeight(saveHBoxHeight);
        saveHBox.setPrefWidth(width);
        Button saveBtn = new Button("保存");
        BtnStyle.saveBtn(saveBtn);
        BtnStyle.saveBtnAction(saveBtn);
        saveBtn.setCursor(Cursor.HAND);
        saveBtn.setPrefWidth(100);
        Button cancelBtn = new Button("取消");
        cancelBtn.setCursor(Cursor.HAND);
        BtnStyle.cancelBtn(cancelBtn);
        BtnStyle.cancelBtnAction(cancelBtn);
        cancelBtn.setPrefWidth(100);
        saveHBox.getChildren().addAll(saveBtn, cancelBtn);
        this.getChildren().add(saveHBox);

        //保存按钮事件
        SaveAddEnpPlanAction saveEnpPlanAction = new SaveAddEnpPlanAction(this);
        saveBtn.setOnAction(saveEnpPlanAction);


        //给取消按钮事件
        CancelEnrollmentPlanBtnAction cancelEnrollmentPlanBtnAction = new CancelEnrollmentPlanBtnAction();
        cancelBtn.setOnAction(cancelEnrollmentPlanBtnAction);


    }
}
